package com.springinaction.ch03.scope;

import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Configuration
public class NotepadConfig {

    @Bean
    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) //SCOPE_PROTOTYPE原型 每次产生一个 SCOPE_SINGLETON 单例
    public Notepad notepad(){
        return new Notepad();
    }



}
